const {Schema, model} = require('mongoose')

const notificationsSchema = new Schema(
  {
    id: {
      type: String,
      required: true,
      unique: true,
    },
    user: {
      type: String,
      required: false,
    },
    text: {
      type: String,
      required: true,
    },
    tag: {
      type: String,
      required: true,
    },
    taskId: {
      type: String,
      required: true,
    },
    isRead: {
      type: String,
      required: false,
    },
  },
  {
    versionKey: false,
  },
)

module.exports = model('Notifications', notificationsSchema)
